import request from '@/utils/request'

export const GetRouteService = () => {
  return request.get('/route/list')
}

export const AddRouteService = (data) => {
  return request.post('/route/add', data)
}

export const EditRouteService = (data) => {
  return request.put('/route/update', data)
}

export const DelRouteService = (id) => {
  return request.delete('/route/delete', {
    params: { id }
  })
}

export const GetRouteDetailService = (id) => {
  return request.get('/route/findById', {
    params: { id }
  })
}

export const GetRouteFindByPointName = (pointName) => {
  return request.get('/route/findRouteByPointName', {
    params: { pointName }
  })
}
